/*     */ package hmc;
/*     */ 
/*     */ import java.awt.Container;
/*     */ import java.awt.event.ActionEvent;
/*     */ import java.awt.event.ActionListener;
/*     */ import java.io.BufferedReader;
/*     */ import java.io.File;
/*     */ import java.io.FileNotFoundException;
/*     */ import java.io.FileReader;
/*     */ import java.io.IOException;
/*     */ import java.util.ArrayList;
/*     */ import javax.swing.AbstractListModel;
/*     */ import javax.swing.DefaultListModel;
/*     */ import javax.swing.GroupLayout;
/*     */ import javax.swing.GroupLayout.Alignment;
/*     */ import javax.swing.GroupLayout.ParallelGroup;
/*     */ import javax.swing.GroupLayout.SequentialGroup;
/*     */ import javax.swing.JButton;
/*     */ import javax.swing.JInternalFrame;
/*     */ import javax.swing.JLabel;
/*     */ import javax.swing.JList;
/*     */ import javax.swing.JPanel;
/*     */ import javax.swing.JScrollPane;
/*     */ import javax.swing.JTabbedPane;
/*     */ import javax.swing.JToggleButton;
/*     */ import javax.swing.LayoutStyle.ComponentPlacement;
/*     */ 
/*     */ public class TestSuiteGUI extends JInternalFrame
/*     */ {
/*     */   private TopLevelGUI TLGUI;
/*  75 */   private DefaultListModel loadedListModel = new DefaultListModel();
/*  76 */   private DefaultListModel ScriptCheckBoxes = new DefaultListModel();
/*  77 */   private ArrayList<File> loadedFiles = new ArrayList();
/*  78 */   private Communicator[] commun = new Communicator[99];
/*     */ 
/*  80 */   private int threadCounter = 0;
/*  81 */   private int outputCounter = 0;
/*  82 */   private int offset = 25;
/*  83 */   private String suiteIterations = "1";
/*     */   private JButton AddButton;
/*     */   private JButton EmailOptionsButton;
/*     */   private JButton ErrorReportButton;
/*     */   private JButton ExecuteSuiteButton;
/*     */   private JButton IterationsButton;
/*     */   private JButton LoadFileButton;
/*     */   private JButton LoadSuiteButton;
/*     */   private JButton MoveDownButton;
/*     */   private JButton MoveUpButton;
/*     */   private JLabel MultiScriptSinglePortLabel;
/*     */   private JPanel PortJPanel;
/*     */   private JList PortList;
/*     */   private JTabbedPane PortTabbedPane;
/*     */   private JButton RemoveButton;
/*     */   private JButton RemoveFileButton;
/*     */   private JButton SaveSuiteButton;
/*     */   private JButton ScanForChangesButton;
/*     */   private JPanel ScriptJPanel;
/*     */   private JList ScriptList;
/*     */   private JTabbedPane ScriptTabbedPane;
/*     */   private JButton StopSuiteButton;
/*     */   private JToggleButton ToggleModeButton;
/*     */   private JScrollPane jScrollPane1;
/*     */   private JScrollPane jScrollPane2;
/*     */ 
/*     */   public TestSuiteGUI(TopLevelGUI x, int multiplier)
/*     */   {
/*  90 */     super("Test Suite", false, true, true, true);
/*     */ 
/*  96 */     this.TLGUI = x;
/*  97 */     initComponents();
/*     */ 
/*  99 */     setLocation(this.offset * multiplier, this.offset * multiplier);
/*     */ 
/* 101 */     File file = new File("Options/LoadedTestSuites.txt");
/* 102 */     FileReader fis = null;
/* 103 */     BufferedReader dis = null;
/*     */     try
/*     */     {
/* 106 */       fis = new FileReader(file);
/*     */ 
/* 108 */       dis = new BufferedReader(fis);
/*     */ 
/* 110 */       while (dis.ready())
/*     */       {
/* 113 */         String bob = dis.readLine();
/* 114 */         this.loadedFiles.add(new File(bob));
/* 115 */         this.loadedListModel.addElement(((File)this.loadedFiles.get(this.loadedFiles.size() - 1)).getName());
/*     */       }
/*     */ 
/* 118 */       fis.close();
/* 119 */       dis.close();
/*     */     } catch (FileNotFoundException e) {
/*     */     }
/*     */     catch (IOException e) {
/*     */     }
/*     */   }
/*     */ 
/*     */   public void initComponents() {
/* 127 */     this.ScriptTabbedPane = new JTabbedPane();
/* 128 */     this.ScriptJPanel = new JPanel();
/* 129 */     this.jScrollPane1 = new JScrollPane();
/* 130 */     this.ScriptList = new JList();
/* 131 */     this.MoveDownButton = new JButton();
/* 132 */     this.SaveSuiteButton = new JButton();
/* 133 */     this.LoadSuiteButton = new JButton();
/* 134 */     this.MoveUpButton = new JButton();
/* 135 */     this.LoadFileButton = new JButton();
/* 136 */     this.RemoveFileButton = new JButton();
/* 137 */     this.PortTabbedPane = new JTabbedPane();
/* 138 */     this.PortJPanel = new JPanel();
/* 139 */     this.jScrollPane2 = new JScrollPane();
/* 140 */     this.PortList = new JList();
/* 141 */     this.ExecuteSuiteButton = new JButton();
/* 142 */     this.StopSuiteButton = new JButton();
/* 143 */     this.IterationsButton = new JButton();
/* 144 */     this.ToggleModeButton = new JToggleButton();
/* 145 */     this.ScanForChangesButton = new JButton();
/* 146 */     this.ErrorReportButton = new JButton();
/* 147 */     this.AddButton = new JButton();
/* 148 */     this.MultiScriptSinglePortLabel = new JLabel();
/* 149 */     this.RemoveButton = new JButton();
/* 150 */     this.EmailOptionsButton = new JButton();
/*     */ 
/* 152 */     setDefaultCloseOperation(3);
/*     */ 
/* 154 */     this.ScriptList.setModel(new AbstractListModel() {
/* 155 */       String[] strings = { "Item 1", "Item 2", "Item 3", "Item 4", "Item 5" };
/*     */ 
/* 156 */       public int getSize() { return this.strings.length; } 
/* 157 */       public Object getElementAt(int i) { return this.strings[i];
/*     */       }
/*     */     });
/* 159 */     this.jScrollPane1.setViewportView(this.ScriptList);
/*     */ 
/* 161 */     this.MoveDownButton.setText("Move Down");
/*     */ 
/* 163 */     this.SaveSuiteButton.setText("Save Suite");
/*     */ 
/* 165 */     this.LoadSuiteButton.setText("Load Suite");
/* 166 */     this.LoadSuiteButton.addActionListener(new ActionListener()
/*     */     {
/*     */       public void actionPerformed(ActionEvent evt)
/*     */       {
/*     */       }
/*     */     });
/* 172 */     this.MoveUpButton.setText("Move Up");
/*     */ 
/* 174 */     this.LoadFileButton.setText("Load File");
/*     */ 
/* 176 */     this.RemoveFileButton.setText("Remove File");
/*     */ 
/* 178 */     GroupLayout ScriptJPanelLayout = new GroupLayout(this.ScriptJPanel);
/* 179 */     this.ScriptJPanel.setLayout(ScriptJPanelLayout);
/* 180 */     ScriptJPanelLayout.setHorizontalGroup(ScriptJPanelLayout.createParallelGroup(GroupLayout.Alignment.LEADING).addGroup(GroupLayout.Alignment.TRAILING, ScriptJPanelLayout.createSequentialGroup().addGroup(ScriptJPanelLayout.createParallelGroup(GroupLayout.Alignment.TRAILING, false).addComponent(this.jScrollPane1, GroupLayout.Alignment.LEADING).addGroup(ScriptJPanelLayout.createSequentialGroup().addGroup(ScriptJPanelLayout.createParallelGroup(GroupLayout.Alignment.LEADING).addComponent(this.LoadFileButton, -1, -1, 32767).addComponent(this.RemoveFileButton)).addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addGroup(ScriptJPanelLayout.createParallelGroup(GroupLayout.Alignment.LEADING).addComponent(this.LoadSuiteButton).addComponent(this.SaveSuiteButton)).addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addGroup(ScriptJPanelLayout.createParallelGroup(GroupLayout.Alignment.LEADING).addComponent(this.MoveDownButton).addComponent(this.MoveUpButton, -1, -1, 32767)))).addGap(114, 114, 114)));
/*     */ 
/* 199 */     ScriptJPanelLayout.setVerticalGroup(ScriptJPanelLayout.createParallelGroup(GroupLayout.Alignment.LEADING).addGroup(GroupLayout.Alignment.TRAILING, ScriptJPanelLayout.createSequentialGroup().addComponent(this.jScrollPane1, -1, 383, 32767).addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED).addGroup(ScriptJPanelLayout.createParallelGroup(GroupLayout.Alignment.BASELINE).addComponent(this.LoadFileButton).addComponent(this.LoadSuiteButton).addComponent(this.MoveUpButton)).addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addGroup(ScriptJPanelLayout.createParallelGroup(GroupLayout.Alignment.BASELINE).addComponent(this.RemoveFileButton).addComponent(this.SaveSuiteButton).addComponent(this.MoveDownButton))));
/*     */ 
/* 215 */     this.ScriptTabbedPane.addTab("tab1", this.ScriptJPanel);
/*     */ 
/* 217 */     this.PortList.setModel(new AbstractListModel() {
/* 218 */       String[] strings = { "Item 1", "Item 2", "Item 3", "Item 4", "Item 5" };
/*     */ 
/* 219 */       public int getSize() { return this.strings.length; } 
/* 220 */       public Object getElementAt(int i) { return this.strings[i];
/*     */       }
/*     */     });
/* 222 */     this.jScrollPane2.setViewportView(this.PortList);
/*     */ 
/* 224 */     this.ExecuteSuiteButton.setText("Execute Suite");
/*     */ 
/* 226 */     this.StopSuiteButton.setText("Stop Suite");
/*     */ 
/* 228 */     this.IterationsButton.setText("Iterations");
/*     */ 
/* 230 */     GroupLayout PortJPanelLayout = new GroupLayout(this.PortJPanel);
/* 231 */     this.PortJPanel.setLayout(PortJPanelLayout);
/* 232 */     PortJPanelLayout.setHorizontalGroup(PortJPanelLayout.createParallelGroup(GroupLayout.Alignment.LEADING).addGroup(PortJPanelLayout.createSequentialGroup().addContainerGap().addComponent(this.ExecuteSuiteButton).addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED).addComponent(this.StopSuiteButton).addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED).addComponent(this.IterationsButton, -1, 100, 32767).addContainerGap()).addComponent(this.jScrollPane2, -1, 320, 32767));
/*     */ 
/* 244 */     PortJPanelLayout.setVerticalGroup(PortJPanelLayout.createParallelGroup(GroupLayout.Alignment.LEADING).addGroup(GroupLayout.Alignment.TRAILING, PortJPanelLayout.createSequentialGroup().addComponent(this.jScrollPane2, -1, 401, 32767).addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED).addGroup(PortJPanelLayout.createParallelGroup(GroupLayout.Alignment.BASELINE).addComponent(this.ExecuteSuiteButton).addComponent(this.StopSuiteButton).addComponent(this.IterationsButton)).addContainerGap()));
/*     */ 
/* 256 */     this.PortTabbedPane.addTab("tab1", this.PortJPanel);
/*     */ 
/* 258 */     this.ToggleModeButton.setText("Toggle Mode");
/*     */ 
/* 260 */     this.ScanForChangesButton.setText("Scan For Changes");
/* 261 */     this.ScanForChangesButton.addActionListener(new ActionListener()
/*     */     {
/*     */       public void actionPerformed(ActionEvent evt)
/*     */       {
/*     */       }
/*     */     });
/* 267 */     this.ErrorReportButton.setText("Error Report");
/*     */ 
/* 269 */     this.AddButton.setText("-->");
/*     */ 
/* 271 */     this.MultiScriptSinglePortLabel.setHorizontalAlignment(0);
/* 272 */     this.MultiScriptSinglePortLabel.setText("Multiple Script - Single Port");
/*     */ 
/* 274 */     this.RemoveButton.setText("<--");
/*     */ 
/* 276 */     this.EmailOptionsButton.setText("Email Options");
/*     */ 
/* 278 */     GroupLayout layout = new GroupLayout(getContentPane());
/* 279 */     getContentPane().setLayout(layout);
/* 280 */     layout.setHorizontalGroup(layout.createParallelGroup(GroupLayout.Alignment.LEADING).addGroup(layout.createSequentialGroup().addComponent(this.ScriptTabbedPane, -2, 279, -2).addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED).addGroup(layout.createParallelGroup(GroupLayout.Alignment.LEADING).addComponent(this.MultiScriptSinglePortLabel, -1, -1, 32767).addComponent(this.ToggleModeButton, -1, 127, 32767).addComponent(this.RemoveButton, -1, 127, 32767).addComponent(this.AddButton, -1, 127, 32767).addComponent(this.ScanForChangesButton, GroupLayout.Alignment.TRAILING, -1, 127, 32767).addComponent(this.ErrorReportButton, GroupLayout.Alignment.TRAILING, -1, 127, 32767).addComponent(this.EmailOptionsButton, -1, 127, 32767)).addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED).addComponent(this.PortTabbedPane, -2, 325, -2)));
/*     */ 
/* 296 */     layout.setVerticalGroup(layout.createParallelGroup(GroupLayout.Alignment.LEADING).addComponent(this.ScriptTabbedPane, -1, 474, 32767).addGroup(layout.createSequentialGroup().addContainerGap().addComponent(this.MultiScriptSinglePortLabel).addGap(11, 11, 11).addComponent(this.ToggleModeButton).addGap(54, 54, 54).addComponent(this.AddButton).addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED).addComponent(this.RemoveButton).addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED).addComponent(this.ScanForChangesButton).addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED).addComponent(this.ErrorReportButton).addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED).addComponent(this.EmailOptionsButton).addContainerGap(202, 32767)).addComponent(this.PortTabbedPane, GroupLayout.Alignment.TRAILING, -1, 474, 32767));
/*     */ 
/* 318 */     pack();
/*     */   }
/*     */ 
/*     */   public void updateColorScheme()
/*     */   {
/*     */   }
/*     */ }

/* Location:           F:\6-30-2012\Hazell\
 * Qualified Name:     hmc.TestSuiteGUI
 * JD-Core Version:    0.6.0
 */